package com.am.meeting.handler;

import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;

public class VideoWebSocketHandler extends TextWebSocketHandler {

    @Override
    public void handleTextMessage(WebSocketSession session, TextMessage message) {
        String payload = message.getPayload();
        // 处理前端的信令信息，如offer, answer, ice candidates
        try {
            // 将接收到的消息发送给其他连接的客户端
            session.sendMessage(new TextMessage("这里是回复消息"));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
